\(\int x (a+b \log (c (d+e x)^n)) (f+g \log (c (d+e x)^n)) \, dx\) [380]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 30, antiderivative size = 196 \[ \int x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx=-\frac {2 b d g n^2 x}{e}+\frac {b g n^2 (d+e x)^2}{4 e^2}+\frac {b d^2 g n^2 \log ^2(d+e x)}{2 e^2}+\frac {1}{2} x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )+\frac {d n (d+e x) \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{e^2}-\frac {n (d+e x)^2 \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{4 e^2}-\frac {d^2 n \log (d+e x) \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{2 e^2} \]

[Out]

-2*b*d*g*n^2*x/e+1/4*b*g*n^2*(e*x+d)^2/e^2+1/2*b*d^2*g*n^2*ln(e*x+d)^2/e^2+1/2*x^2*(a+b*ln(c*(e*x+d)^n))*(f+g*
ln(c*(e*x+d)^n))+d*n*(e*x+d)*(b*f+a*g+2*b*g*ln(c*(e*x+d)^n))/e^2-1/4*n*(e*x+d)^2*(b*f+a*g+2*b*g*ln(c*(e*x+d)^n
))/e^2-1/2*d^2*n*ln(e*x+d)*(b*f+a*g+2*b*g*ln(c*(e*x+d)^n))/e^2

Rubi [A] (verified)

Time = 0.18 (sec) , antiderivative size = 196, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.233, Rules used = {2483, 2458, 45, 2372, 12, 14, 2338} \[ \int x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx=-\frac {d^2 n \log (d+e x) \left (a g+2 b g \log \left (c (d+e x)^n\right )+b f\right )}{2 e^2}+\frac {d n (d+e x) \left (a g+2 b g \log \left (c (d+e x)^n\right )+b f\right )}{e^2}-\frac {n (d+e x)^2 \left (a g+2 b g \log \left (c (d+e x)^n\right )+b f\right )}{4 e^2}+\frac {1}{2} x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )+\frac {b d^2 g n^2 \log ^2(d+e x)}{2 e^2}+\frac {b g n^2 (d+e x)^2}{4 e^2}-\frac {2 b d g n^2 x}{e} \]

[In]

Int[x*(a + b*Log[c*(d + e*x)^n])*(f + g*Log[c*(d + e*x)^n]),x]

[Out]

(-2*b*d*g*n^2*x)/e + (b*g*n^2*(d + e*x)^2)/(4*e^2) + (b*d^2*g*n^2*Log[d + e*x]^2)/(2*e^2) + (x^2*(a + b*Log[c*
(d + e*x)^n])*(f + g*Log[c*(d + e*x)^n]))/2 + (d*n*(d + e*x)*(b*f + a*g + 2*b*g*Log[c*(d + e*x)^n]))/e^2 - (n*
(d + e*x)^2*(b*f + a*g + 2*b*g*Log[c*(d + e*x)^n]))/(4*e^2) - (d^2*n*Log[d + e*x]*(b*f + a*g + 2*b*g*Log[c*(d
+ e*x)^n]))/(2*e^2)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2372

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]]
 /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rule 2458

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))
^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[(g*(x/e))^q*((e*h - d*i)/e + i*(x/e))^r*(a + b*Log[c*x^n])^p, x], x,
d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - d*g, 0] && (IGtQ[p, 0] || IGtQ[
r, 0]) && IntegerQ[2*r]

Rule 2483

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(g_.))*
(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)*(a + b*Log[c*(d + e*x)^n])*((f + g*Log[c*(d + e*x)^n])/(m + 1)), x] -
Dist[e*(n/(m + 1)), Int[(x^(m + 1)*(b*f + a*g + 2*b*g*Log[c*(d + e*x)^n]))/(d + e*x), x], x] /; FreeQ[{a, b, c
, d, e, f, g, n, m}, x] && NeQ[m, -1]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{2} x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )-\frac {1}{2} (e n) \int \frac {x^2 \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{d+e x} \, dx \\ & = \frac {1}{2} x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )-\frac {1}{2} n \text {Subst}\left (\int \frac {\left (-\frac {d}{e}+\frac {x}{e}\right )^2 \left (b f+a g+2 b g \log \left (c x^n\right )\right )}{x} \, dx,x,d+e x\right ) \\ & = \frac {1}{2} x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )+\frac {d n (d+e x) \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{e^2}-\frac {n (d+e x)^2 \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{4 e^2}-\frac {d^2 n \log (d+e x) \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{2 e^2}+\left (b g n^2\right ) \text {Subst}\left (\int \frac {x (-4 d+x)+2 d^2 \log (x)}{2 e^2 x} \, dx,x,d+e x\right ) \\ & = \frac {1}{2} x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )+\frac {d n (d+e x) \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{e^2}-\frac {n (d+e x)^2 \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{4 e^2}-\frac {d^2 n \log (d+e x) \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{2 e^2}+\frac {\left (b g n^2\right ) \text {Subst}\left (\int \frac {x (-4 d+x)+2 d^2 \log (x)}{x} \, dx,x,d+e x\right )}{2 e^2} \\ & = \frac {1}{2} x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )+\frac {d n (d+e x) \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{e^2}-\frac {n (d+e x)^2 \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{4 e^2}-\frac {d^2 n \log (d+e x) \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{2 e^2}+\frac {\left (b g n^2\right ) \text {Subst}\left (\int \left (-4 d+x+\frac {2 d^2 \log (x)}{x}\right ) \, dx,x,d+e x\right )}{2 e^2} \\ & = -\frac {2 b d g n^2 x}{e}+\frac {b g n^2 (d+e x)^2}{4 e^2}+\frac {1}{2} x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )+\frac {d n (d+e x) \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{e^2}-\frac {n (d+e x)^2 \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{4 e^2}-\frac {d^2 n \log (d+e x) \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{2 e^2}+\frac {\left (b d^2 g n^2\right ) \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,d+e x\right )}{e^2} \\ & = -\frac {2 b d g n^2 x}{e}+\frac {b g n^2 (d+e x)^2}{4 e^2}+\frac {b d^2 g n^2 \log ^2(d+e x)}{2 e^2}+\frac {1}{2} x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )+\frac {d n (d+e x) \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{e^2}-\frac {n (d+e x)^2 \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{4 e^2}-\frac {d^2 n \log (d+e x) \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{2 e^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 152, normalized size of antiderivative = 0.78 \[ \int x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx=\frac {e x (2 a d g n+2 b d n (f-3 g n)+a e (2 f-g n) x+b e n (-f+g n) x)-2 d^2 (b f+a g) n \log (d+e x)+2 \left (a e^2 g x^2+b \left (3 d^2 g n+2 d e g n x+e^2 (f-g n) x^2\right )\right ) \log \left (c (d+e x)^n\right )-2 b g \left (d^2-e^2 x^2\right ) \log ^2\left (c (d+e x)^n\right )}{4 e^2} \]

[In]

Integrate[x*(a + b*Log[c*(d + e*x)^n])*(f + g*Log[c*(d + e*x)^n]),x]

[Out]

(e*x*(2*a*d*g*n + 2*b*d*n*(f - 3*g*n) + a*e*(2*f - g*n)*x + b*e*n*(-f + g*n)*x) - 2*d^2*(b*f + a*g)*n*Log[d +
e*x] + 2*(a*e^2*g*x^2 + b*(3*d^2*g*n + 2*d*e*g*n*x + e^2*(f - g*n)*x^2))*Log[c*(d + e*x)^n] - 2*b*g*(d^2 - e^2
*x^2)*Log[c*(d + e*x)^n]^2)/(4*e^2)

Maple [A] (verified)

Time = 0.56 (sec) , antiderivative size = 284, normalized size of antiderivative = 1.45

method result size
parallelrisch \(-\frac {-2 x^{2} \ln \left (c \left (e x +d \right )^{n}\right )^{2} b \,e^{2} g +2 x^{2} \ln \left (c \left (e x +d \right )^{n}\right ) b \,e^{2} g n -x^{2} e^{2} b g \,n^{2}-10 \ln \left (e x +d \right ) b \,d^{2} g \,n^{2}-2 x^{2} \ln \left (c \left (e x +d \right )^{n}\right ) a \,e^{2} g -2 x^{2} \ln \left (c \left (e x +d \right )^{n}\right ) b \,e^{2} f +x^{2} e^{2} n a g +b \,e^{2} f n \,x^{2}-4 x \ln \left (c \left (e x +d \right )^{n}\right ) b d e g n +6 x e b d g \,n^{2}+2 \ln \left (e x +d \right ) a \,d^{2} g n +2 \ln \left (e x +d \right ) b \,d^{2} f n -2 a \,e^{2} f \,x^{2}-2 a d e g n x -2 b d e f n x +2 \ln \left (c \left (e x +d \right )^{n}\right )^{2} b \,d^{2} g +4 \ln \left (c \left (e x +d \right )^{n}\right ) b \,d^{2} g n -6 b \,d^{2} g \,n^{2}+2 a \,d^{2} g n +2 d^{2} b f n}{4 e^{2}}\) \(284\)
risch \(\text {Expression too large to display}\) \(1558\)

[In]

int(x*(a+b*ln(c*(e*x+d)^n))*(f+g*ln(c*(e*x+d)^n)),x,method=_RETURNVERBOSE)

[Out]

-1/4*(-2*x^2*ln(c*(e*x+d)^n)^2*b*e^2*g+2*x^2*ln(c*(e*x+d)^n)*b*e^2*g*n-x^2*e^2*b*g*n^2-10*ln(e*x+d)*b*d^2*g*n^
2-2*x^2*ln(c*(e*x+d)^n)*a*e^2*g-2*x^2*ln(c*(e*x+d)^n)*b*e^2*f+x^2*e^2*n*a*g+b*e^2*f*n*x^2-4*x*ln(c*(e*x+d)^n)*
b*d*e*g*n+6*x*e*b*d*g*n^2+2*ln(e*x+d)*a*d^2*g*n+2*ln(e*x+d)*b*d^2*f*n-2*a*e^2*f*x^2-2*a*d*e*g*n*x-2*b*d*e*f*n*
x+2*ln(c*(e*x+d)^n)^2*b*d^2*g+4*ln(c*(e*x+d)^n)*b*d^2*g*n-6*b*d^2*g*n^2+2*a*d^2*g*n+2*d^2*b*f*n)/e^2

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 256, normalized size of antiderivative = 1.31 \[ \int x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx=\frac {2 \, b e^{2} g x^{2} \log \left (c\right )^{2} + {\left (b e^{2} g n^{2} + 2 \, a e^{2} f - {\left (b e^{2} f + a e^{2} g\right )} n\right )} x^{2} + 2 \, {\left (b e^{2} g n^{2} x^{2} - b d^{2} g n^{2}\right )} \log \left (e x + d\right )^{2} - 2 \, {\left (3 \, b d e g n^{2} - {\left (b d e f + a d e g\right )} n\right )} x + 2 \, {\left (2 \, b d e g n^{2} x + 3 \, b d^{2} g n^{2} - {\left (b e^{2} g n^{2} - {\left (b e^{2} f + a e^{2} g\right )} n\right )} x^{2} - {\left (b d^{2} f + a d^{2} g\right )} n + 2 \, {\left (b e^{2} g n x^{2} - b d^{2} g n\right )} \log \left (c\right )\right )} \log \left (e x + d\right ) + 2 \, {\left (2 \, b d e g n x - {\left (b e^{2} g n - b e^{2} f - a e^{2} g\right )} x^{2}\right )} \log \left (c\right )}{4 \, e^{2}} \]

[In]

integrate(x*(a+b*log(c*(e*x+d)^n))*(f+g*log(c*(e*x+d)^n)),x, algorithm="fricas")

[Out]

1/4*(2*b*e^2*g*x^2*log(c)^2 + (b*e^2*g*n^2 + 2*a*e^2*f - (b*e^2*f + a*e^2*g)*n)*x^2 + 2*(b*e^2*g*n^2*x^2 - b*d
^2*g*n^2)*log(e*x + d)^2 - 2*(3*b*d*e*g*n^2 - (b*d*e*f + a*d*e*g)*n)*x + 2*(2*b*d*e*g*n^2*x + 3*b*d^2*g*n^2 -
(b*e^2*g*n^2 - (b*e^2*f + a*e^2*g)*n)*x^2 - (b*d^2*f + a*d^2*g)*n + 2*(b*e^2*g*n*x^2 - b*d^2*g*n)*log(c))*log(
e*x + d) + 2*(2*b*d*e*g*n*x - (b*e^2*g*n - b*e^2*f - a*e^2*g)*x^2)*log(c))/e^2

Sympy [A] (verification not implemented)

Time = 0.65 (sec) , antiderivative size = 296, normalized size of antiderivative = 1.51 \[ \int x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx=\begin {cases} - \frac {a d^{2} g \log {\left (c \left (d + e x\right )^{n} \right )}}{2 e^{2}} + \frac {a d g n x}{2 e} + \frac {a f x^{2}}{2} - \frac {a g n x^{2}}{4} + \frac {a g x^{2} \log {\left (c \left (d + e x\right )^{n} \right )}}{2} - \frac {b d^{2} f \log {\left (c \left (d + e x\right )^{n} \right )}}{2 e^{2}} + \frac {3 b d^{2} g n \log {\left (c \left (d + e x\right )^{n} \right )}}{2 e^{2}} - \frac {b d^{2} g \log {\left (c \left (d + e x\right )^{n} \right )}^{2}}{2 e^{2}} + \frac {b d f n x}{2 e} - \frac {3 b d g n^{2} x}{2 e} + \frac {b d g n x \log {\left (c \left (d + e x\right )^{n} \right )}}{e} - \frac {b f n x^{2}}{4} + \frac {b f x^{2} \log {\left (c \left (d + e x\right )^{n} \right )}}{2} + \frac {b g n^{2} x^{2}}{4} - \frac {b g n x^{2} \log {\left (c \left (d + e x\right )^{n} \right )}}{2} + \frac {b g x^{2} \log {\left (c \left (d + e x\right )^{n} \right )}^{2}}{2} & \text {for}\: e \neq 0 \\\frac {x^{2} \left (a + b \log {\left (c d^{n} \right )}\right ) \left (f + g \log {\left (c d^{n} \right )}\right )}{2} & \text {otherwise} \end {cases} \]

[In]

integrate(x*(a+b*ln(c*(e*x+d)**n))*(f+g*ln(c*(e*x+d)**n)),x)

[Out]

Piecewise((-a*d**2*g*log(c*(d + e*x)**n)/(2*e**2) + a*d*g*n*x/(2*e) + a*f*x**2/2 - a*g*n*x**2/4 + a*g*x**2*log
(c*(d + e*x)**n)/2 - b*d**2*f*log(c*(d + e*x)**n)/(2*e**2) + 3*b*d**2*g*n*log(c*(d + e*x)**n)/(2*e**2) - b*d**
2*g*log(c*(d + e*x)**n)**2/(2*e**2) + b*d*f*n*x/(2*e) - 3*b*d*g*n**2*x/(2*e) + b*d*g*n*x*log(c*(d + e*x)**n)/e
 - b*f*n*x**2/4 + b*f*x**2*log(c*(d + e*x)**n)/2 + b*g*n**2*x**2/4 - b*g*n*x**2*log(c*(d + e*x)**n)/2 + b*g*x*
*2*log(c*(d + e*x)**n)**2/2, Ne(e, 0)), (x**2*(a + b*log(c*d**n))*(f + g*log(c*d**n))/2, True))

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 224, normalized size of antiderivative = 1.14 \[ \int x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx=\frac {1}{2} \, b g x^{2} \log \left ({\left (e x + d\right )}^{n} c\right )^{2} - \frac {1}{4} \, b e f n {\left (\frac {2 \, d^{2} \log \left (e x + d\right )}{e^{3}} + \frac {e x^{2} - 2 \, d x}{e^{2}}\right )} - \frac {1}{4} \, a e g n {\left (\frac {2 \, d^{2} \log \left (e x + d\right )}{e^{3}} + \frac {e x^{2} - 2 \, d x}{e^{2}}\right )} + \frac {1}{2} \, b f x^{2} \log \left ({\left (e x + d\right )}^{n} c\right ) + \frac {1}{2} \, a g x^{2} \log \left ({\left (e x + d\right )}^{n} c\right ) + \frac {1}{2} \, a f x^{2} - \frac {1}{4} \, {\left (2 \, e n {\left (\frac {2 \, d^{2} \log \left (e x + d\right )}{e^{3}} + \frac {e x^{2} - 2 \, d x}{e^{2}}\right )} \log \left ({\left (e x + d\right )}^{n} c\right ) - \frac {{\left (e^{2} x^{2} + 2 \, d^{2} \log \left (e x + d\right )^{2} - 6 \, d e x + 6 \, d^{2} \log \left (e x + d\right )\right )} n^{2}}{e^{2}}\right )} b g \]

[In]

integrate(x*(a+b*log(c*(e*x+d)^n))*(f+g*log(c*(e*x+d)^n)),x, algorithm="maxima")

[Out]

1/2*b*g*x^2*log((e*x + d)^n*c)^2 - 1/4*b*e*f*n*(2*d^2*log(e*x + d)/e^3 + (e*x^2 - 2*d*x)/e^2) - 1/4*a*e*g*n*(2
*d^2*log(e*x + d)/e^3 + (e*x^2 - 2*d*x)/e^2) + 1/2*b*f*x^2*log((e*x + d)^n*c) + 1/2*a*g*x^2*log((e*x + d)^n*c)
 + 1/2*a*f*x^2 - 1/4*(2*e*n*(2*d^2*log(e*x + d)/e^3 + (e*x^2 - 2*d*x)/e^2)*log((e*x + d)^n*c) - (e^2*x^2 + 2*d
^2*log(e*x + d)^2 - 6*d*e*x + 6*d^2*log(e*x + d))*n^2/e^2)*b*g

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 467 vs. \(2 (186) = 372\).

Time = 0.32 (sec) , antiderivative size = 467, normalized size of antiderivative = 2.38 \[ \int x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx=\frac {{\left (e x + d\right )}^{2} b g n^{2} \log \left (e x + d\right )^{2}}{2 \, e^{2}} - \frac {{\left (e x + d\right )} b d g n^{2} \log \left (e x + d\right )^{2}}{e^{2}} - \frac {{\left (e x + d\right )}^{2} b g n^{2} \log \left (e x + d\right )}{2 \, e^{2}} + \frac {2 \, {\left (e x + d\right )} b d g n^{2} \log \left (e x + d\right )}{e^{2}} + \frac {{\left (e x + d\right )}^{2} b g n \log \left (e x + d\right ) \log \left (c\right )}{e^{2}} - \frac {2 \, {\left (e x + d\right )} b d g n \log \left (e x + d\right ) \log \left (c\right )}{e^{2}} + \frac {{\left (e x + d\right )}^{2} b g n^{2}}{4 \, e^{2}} - \frac {2 \, {\left (e x + d\right )} b d g n^{2}}{e^{2}} + \frac {{\left (e x + d\right )}^{2} b f n \log \left (e x + d\right )}{2 \, e^{2}} - \frac {{\left (e x + d\right )} b d f n \log \left (e x + d\right )}{e^{2}} + \frac {{\left (e x + d\right )}^{2} a g n \log \left (e x + d\right )}{2 \, e^{2}} - \frac {{\left (e x + d\right )} a d g n \log \left (e x + d\right )}{e^{2}} - \frac {{\left (e x + d\right )}^{2} b g n \log \left (c\right )}{2 \, e^{2}} + \frac {2 \, {\left (e x + d\right )} b d g n \log \left (c\right )}{e^{2}} + \frac {{\left (e x + d\right )}^{2} b g \log \left (c\right )^{2}}{2 \, e^{2}} - \frac {{\left (e x + d\right )} b d g \log \left (c\right )^{2}}{e^{2}} - \frac {{\left (e x + d\right )}^{2} b f n}{4 \, e^{2}} + \frac {{\left (e x + d\right )} b d f n}{e^{2}} - \frac {{\left (e x + d\right )}^{2} a g n}{4 \, e^{2}} + \frac {{\left (e x + d\right )} a d g n}{e^{2}} + \frac {{\left (e x + d\right )}^{2} b f \log \left (c\right )}{2 \, e^{2}} - \frac {{\left (e x + d\right )} b d f \log \left (c\right )}{e^{2}} + \frac {{\left (e x + d\right )}^{2} a g \log \left (c\right )}{2 \, e^{2}} - \frac {{\left (e x + d\right )} a d g \log \left (c\right )}{e^{2}} + \frac {{\left (e x + d\right )}^{2} a f}{2 \, e^{2}} - \frac {{\left (e x + d\right )} a d f}{e^{2}} \]

[In]

integrate(x*(a+b*log(c*(e*x+d)^n))*(f+g*log(c*(e*x+d)^n)),x, algorithm="giac")

[Out]

1/2*(e*x + d)^2*b*g*n^2*log(e*x + d)^2/e^2 - (e*x + d)*b*d*g*n^2*log(e*x + d)^2/e^2 - 1/2*(e*x + d)^2*b*g*n^2*
log(e*x + d)/e^2 + 2*(e*x + d)*b*d*g*n^2*log(e*x + d)/e^2 + (e*x + d)^2*b*g*n*log(e*x + d)*log(c)/e^2 - 2*(e*x
 + d)*b*d*g*n*log(e*x + d)*log(c)/e^2 + 1/4*(e*x + d)^2*b*g*n^2/e^2 - 2*(e*x + d)*b*d*g*n^2/e^2 + 1/2*(e*x + d
)^2*b*f*n*log(e*x + d)/e^2 - (e*x + d)*b*d*f*n*log(e*x + d)/e^2 + 1/2*(e*x + d)^2*a*g*n*log(e*x + d)/e^2 - (e*
x + d)*a*d*g*n*log(e*x + d)/e^2 - 1/2*(e*x + d)^2*b*g*n*log(c)/e^2 + 2*(e*x + d)*b*d*g*n*log(c)/e^2 + 1/2*(e*x
 + d)^2*b*g*log(c)^2/e^2 - (e*x + d)*b*d*g*log(c)^2/e^2 - 1/4*(e*x + d)^2*b*f*n/e^2 + (e*x + d)*b*d*f*n/e^2 -
1/4*(e*x + d)^2*a*g*n/e^2 + (e*x + d)*a*d*g*n/e^2 + 1/2*(e*x + d)^2*b*f*log(c)/e^2 - (e*x + d)*b*d*f*log(c)/e^
2 + 1/2*(e*x + d)^2*a*g*log(c)/e^2 - (e*x + d)*a*d*g*log(c)/e^2 + 1/2*(e*x + d)^2*a*f/e^2 - (e*x + d)*a*d*f/e^
2

Mupad [B] (verification not implemented)

Time = 1.45 (sec) , antiderivative size = 203, normalized size of antiderivative = 1.04 \[ \int x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx=x\,\left (\frac {d\,\left (a\,f-b\,g\,n^2\right )}{e}-\frac {d\,\left (a\,f-\frac {a\,g\,n}{2}-\frac {b\,f\,n}{2}+\frac {b\,g\,n^2}{2}\right )}{e}\right )+\ln \left (c\,{\left (d+e\,x\right )}^n\right )\,\left (\left (\frac {a\,g}{2}+\frac {b\,f}{2}-\frac {b\,g\,n}{2}\right )\,x^2+\left (\frac {d\,\left (a\,g+b\,f\right )}{e}-\frac {d\,\left (a\,g+b\,f-b\,g\,n\right )}{e}\right )\,x\right )+{\ln \left (c\,{\left (d+e\,x\right )}^n\right )}^2\,\left (\frac {b\,g\,x^2}{2}-\frac {b\,d^2\,g}{2\,e^2}\right )+x^2\,\left (\frac {a\,f}{2}-\frac {a\,g\,n}{4}-\frac {b\,f\,n}{4}+\frac {b\,g\,n^2}{4}\right )-\frac {\ln \left (d+e\,x\right )\,\left (a\,d^2\,g\,n+b\,d^2\,f\,n-3\,b\,d^2\,g\,n^2\right )}{2\,e^2} \]

[In]

int(x*(a + b*log(c*(d + e*x)^n))*(f + g*log(c*(d + e*x)^n)),x)

[Out]

x*((d*(a*f - b*g*n^2))/e - (d*(a*f - (a*g*n)/2 - (b*f*n)/2 + (b*g*n^2)/2))/e) + log(c*(d + e*x)^n)*(x*((d*(a*g
 + b*f))/e - (d*(a*g + b*f - b*g*n))/e) + x^2*((a*g)/2 + (b*f)/2 - (b*g*n)/2)) + log(c*(d + e*x)^n)^2*((b*g*x^
2)/2 - (b*d^2*g)/(2*e^2)) + x^2*((a*f)/2 - (a*g*n)/4 - (b*f*n)/4 + (b*g*n^2)/4) - (log(d + e*x)*(a*d^2*g*n + b
*d^2*f*n - 3*b*d^2*g*n^2))/(2*e^2)